package com.lin.sunnyweather.logic.network

import com.lin.sunnyweather.SunnyWeatherApplication
import com.lin.sunnyweather.logic.model.LifeIndexResponse
import com.lin.sunnyweather.logic.model.NowResponse
import com.lin.sunnyweather.logic.model.ThreeDayResponse
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query

interface WeatherService {
    @GET("v7/weather/now?key=${SunnyWeatherApplication.TOKEN}")
    fun nowWeather(@Query("location") location: String): Call<NowResponse>

    @GET("v7/weather/3d?key=${SunnyWeatherApplication.TOKEN}")
    fun threeDayWeather(@Query("location") location: String): Call<ThreeDayResponse>

    @GET("v7/indices/1d?key=${SunnyWeatherApplication.TOKEN}&type=2,3,5,9")
    fun lifeIndex(@Query("location") location: String): Call<LifeIndexResponse>
}